Skip to content

Adding VJP for gated delta net. - #4565

Merged
tpegolotti merged 16 commits into
mainfrom
gdn-vjp
Sep 29, 2026
Merged

tpegolotti merged 16 commits into
mainfrom
gdn-vjp

Conversation

@tpegolotti

@tpegolotti tpegolotti commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Adding VJP kernels for the gated delta net. This PR continues the work started in #4020.

Two kernels are added, one for the sequential case (pure metal kernel) and one for the chunked case (using neural accelerator).

Performance

The benchmark sweeps the Gated Delta backward over batch sizes 1, 4 and 8 and sequence lengths from 8 to 4096, at Hk=16, Hv=32, Dk=Dv=128, comparing the sequential kernel, the chunked NAX kernel and the ops fallback.
The chunked kernel is 1.4x to 6.3x faster than the sequential one and 9x to 79x faster than the fallback.

gdn_backward

@tpegolotti
tpegolotti requested a review from jagrit06 September 25, 2026 16:37
@tpegolotti
tpegolotti requested a review from zcbenz September 28, 2026 21:25
@tpegolotti
tpegolotti marked this pull request as ready for review September 28, 2026 21:25

@zcbenz zcbenz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@jagrit06 jagrit06 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@tpegolotti
tpegolotti merged commit 9295197 into main Sep 29, 2026
29 checks passed
@tpegolotti
tpegolotti deleted the gdn-vjp branch September 29, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants